package obj.day6;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.SimpleTimeZone;

/**
 * @author げっしょく
 * @date 2021/7/22
 */
public class Time {
    public static void main(String[] args) throws ParseException {
        //System.out.println(new Date(31L * 24 * 3600 * 1000));
        //Date de = new Date();
        //SimpleDateFormat ce = new SimpleDateFormat("yyyy-MM-dd");
        //System.out.println(ce.format(de));
        //System.out.println(ce.parse("2014-06-30"));
        String s = "2001-02-20 20:05:20";
        Date d = new Date();
        SimpleDateFormat SD = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date p = SD.parse(s);
        System.out.println(p);
        String format = SD.format(d);
        System.out.println(format);
    }
}
